﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SIMS_GUI_Item
{
    public partial class AdminManagementAccount : Form
    {
        public AdminManagementAccount()
        {
            InitializeComponent();
        }

        public AdminManagementAccount(string UserName, string PassWord)
        {
            InitializeComponent();
            this.lbl_UserName.Text = UserName;
            this.lbl_PassWord.Text = PassWord;
        }

        private void Item_User_Click(object sender, EventArgs e)
        {
            AdminManagementUser us = new AdminManagementUser();
            us.Show();
            this.Close();
        }

        private void Item_Course_Click(object sender, EventArgs e)
        {
            AdminManagementCourse cs = new AdminManagementCourse();
            cs.Show();
            this.Close();
        }

        private void Item_Help_Click(object sender, EventArgs e)
        {
            AdminManagementHelp hp = new AdminManagementHelp();
            hp.Show();
            this.Close();
        }

        private void btn_Modification_Click(object sender, EventArgs e)
        {
            /*
            ModificationPassWord mp = new ModificationPassWord(lbl_UserName.Text, lbl_PassWord.Text);
            mp.BackColor = Color.FromArgb(50, 69, 101);
            mp.Width = 1215;
            mp.Height = 850;
            mp.Location = new Point(209, 175);
            mp.Show();
            */
            this.pnl_Account.Controls.Clear();
            mp.TopLevel = false;
            mp.Dock = DockStyle.Fill;
            this.pnl_Account.Controls.Add(mp);
            mp.Show();
        }

        private void btn_Exit_Click(object sender, EventArgs e)
        {
            this.Close();
            Login lg = new Login();
            lg.Show();
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            Graphics g = e.Graphics;
        }

        ModificationPassWord mp;
        private void AdminManagementAccount_Load(object sender, EventArgs e)
        {
            mp = new ModificationPassWord(lbl_UserName.Text, lbl_PassWord.Text);
        }

        private void Item_User_MouseHover(object sender, EventArgs e)
        {
            this.BackColor = Color.FromArgb(153, 179, 212);
            this.ForeColor = Color.White;
        }

        private void Item_Course_MouseHover(object sender, EventArgs e)
        {
            this.BackColor = Color.FromArgb(153, 179, 212);
            this.ForeColor = Color.White;
        }

        private void Item_Help_MouseHover(object sender, EventArgs e)
        {
            this.BackColor = Color.FromArgb(153, 179, 212);
            this.ForeColor = Color.White;
        }
    }
}
